import { request } from '@/utils/request.js'

// 获取订单支付信息
export function apiGetPaymentData(data = {}) {
	return request({
		url: "/order/paymentData",
		data
	})
}

// 获取微信支付信息
export function apiPayment(data = {}) {
	return request({
		url: "/order/payment",
		data,
		method: "post",
	})
}

// 余额支付
export function apiBalancePay(data = {}) {
	return request({
		url: "/order/balancePay",
		data,
		method: "post",
	})
}

// 组合支付
export function apiMixPay(data = {}) {
	return request({
		url: "/order/mixPay",
		data,
		method: "post",
	})
}

// 订单支付完成之后获取优惠券
export function apiGetPayRandCoupon(data = {}) {
	return request({
		url: "/productCoupon/getPayRandCoupon",
		data
	})
}

// 订单支付完成之后领取优惠券
export function apiReceive(data = {}) {
	return request({
		url: "/productCoupon/receive",
		data,
		method: "post",
	})
}

// 订单支付完成之后获取红包活动
export function apiGetActivityByScene(data = {}) {
	return request({
		url: "/redPacket/getActivityByScene",
		data
	})
}

// 订单支付完成之后领取红包活动
export function apiActivityBySceneReceive(data = {}) {
	return request({
		url: "/redPacket/receive",
		data,
		method: "post",
	})
}

// 获取订单列表
export function apiGetOrderList(data = {}) {
	return request({
		url: "/order/list",
		data
	})
}

// 订单确认收货
export function apiReceipt(data = {}) {
	return request({
		url: "/order/receipt",
		data,
		method: "post",
	})
}

// 获取物流列表
export function apiGetLogisticsList(data = {}) {
	return request({
		url: "/order/logisticsList",
		data
	})
}

// 获取物流详情
export function apiGetLogisticsDetail(data = {}) {
	return request({
		url: "/order/logisticsDetail",
		data
	})
}


// 获取订单详情
export function apiGetOrderDetail(data = {}) {
	return request({
		url: "/order/detail",
		data
	})
}

// 取消订单
export function apiCancel(data = {}) {
	return request({
		url: "/order/cancel",
		data,
		method: "post",
	})
}

